﻿<%@ Page Title="New Customer Type" Language="C#" MasterPageFile="~/Pages/admin/adminMaster.Master" AutoEventWireup="true" CodeBehind="NewCustomerType.aspx.cs" Inherits="WarehouseWebAPP.Pages.admin.New_Entities.NewCustomerType" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table class="style1">
    <tr>
        <td>
            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                <ContentTemplate>
                    <asp:DetailsView ID="CustomerTypeDetailsView" runat="server" AllowPaging="True" 
                AutoGenerateRows="False" CellPadding="4" DataKeyNames="customer_type_num" 
                DataSourceID="CustomerTypeObjectDataSource" DefaultMode="Insert" 
                ForeColor="#333333" GridLines="None" Height="50px" 
    Width="433px">
                        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                        <CommandRowStyle BackColor="#E2DED6" Font-Bold="True" />
                        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                        <FieldHeaderStyle BackColor="#E9ECF1" Font-Bold="True" />
                        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                        <Fields>
                            <asp:BoundField DataField="customer_type_num" HeaderText="customer_type_num" 
                        ReadOnly="True" SortExpression="customer_type_num" Visible="False" />
                            <asp:TemplateField HeaderText="Customer Type" SortExpression="customer_type">
                                <EditItemTemplate>
                                    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("customer_type") %>'></asp:TextBox>
                                </EditItemTemplate>
                                <InsertItemTemplate>
                                    <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("customer_type") %>'></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                                ErrorMessage="*" ControlToValidate="TextBox1"></asp:RequiredFieldValidator>
                                    <asp:CustomValidator ID="CustomValidator1" runat="server" 
                                ErrorMessage="Already Exist." 
                                onservervalidate="CustomValidator1_ServerValidate" 
                                ControlToValidate="TextBox1"></asp:CustomValidator>
                                </InsertItemTemplate>
                                <ItemTemplate>
                                    <asp:Label ID="Label1" runat="server" Text='<%# Bind("customer_type") %>'></asp:Label>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:CommandField ShowInsertButton="True" />
                        </Fields>
                        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                        <EditRowStyle BackColor="#999999" />
                        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                    </asp:DetailsView>
                </ContentTemplate>
            </asp:UpdatePanel>
            <asp:ObjectDataSource ID="CustomerTypeObjectDataSource" runat="server" 
                InsertMethod="CustomerTypeInsert" SelectMethod="CustomerTypeGet" 
                TypeName="WarehouseWebAPP.code.BLL.CustomerTypeBLL">
                <InsertParameters>
                    <asp:Parameter Name="customer_type" Type="String" />
                </InsertParameters>
            </asp:ObjectDataSource>
        </td>
    </tr>
</table>
</asp:Content>
